//Team: Tuzzy Fester and the Testimonials
//Sara Thorup, Tom Lewis, & Becky Kluth
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;


public class InsertTest {
	LinkedList ll = null;

	@Before
	public void setUp() throws Exception {
		ll = new LinkedList();  //instantiate a new linked list for each test
	}

	//Insert a new node when list is initially empty
	@Test
	public void testWithEmptyList() {
		ll.insert(1);
		int actualNodeValue = ll.start.getData();
		Assert.assertEquals(1, actualNodeValue);
	}
	
	//Insert a new node when list initially has one node
	@Test
	public void testWithOneNode() {
		ll.insert(1);
		ll.insert(2);
		int actualNodeValue = ll.start.getNext().getData();
		Assert.assertEquals(2, actualNodeValue);
	}
	
	//Insert a new node when list initially has two nodes
	@Test
	public void testWithTwoNodes() {
		ll.insert(1);
		ll.insert(2);
		ll.insert(3);
		int actualNodeValue = ll.start.getNext().getNext().getData();
		Assert.assertEquals(3, actualNodeValue);
		
	}

}
